package models

import "gorm.io/gorm"

type ListVideo struct {
	gorm.Model
	Title   string `gorm:"varchar(30)" json:"title"`
	Content string `gorm:"varchar(100)" json:"content"`
	Img     string `gorm:"varchar(255)" json:"img"`
	LikeNum int    `gorm:"int" json:"like_num"`
	LookNum int    `gorm:"int" json:"look_num"` //关注量
	UserId  int    `gorm:"int" json:"user_id"`
	User    User   `gorm:"foreignKey:UserId" json:"user"`
}
type User struct {
	gorm.Model
	Username string `gorm:"varchar(30)" json:"name"`
	Password string `gorm:"varchar(30)" json:"password"`
	Email    string `gorm:"varchar(30)" json:"email"`
}
